﻿using System;
using System.Net;
using System.Windows;
using System.Collections.Generic;
using System.ComponentModel;
using Windows.UI.Xaml;
using Windows.Foundation;

namespace BlueRoseGames.Controls.Text
{
    public class Transform : DependencyObject
    {
        #region DependencyProperties

        public static readonly DependencyProperty DisabledProperty = DependencyProperty.Register("Disabled", typeof(bool), typeof(Transform), new PropertyMetadata(false, OnDisabledChanged));
        public bool Disabled
        {
            get { return (bool)GetValue(DisabledProperty); }
            set { SetValue(DisabledProperty, value); }
        }

        protected bool _disabled = false;
        internal bool GetDisabledState()
        {
            return _disabled;
        }

        private static void OnDisabledChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
        {
            var t = (Transform)dependencyObject;
            t._disabled = (bool)e.NewValue;
            t.Changed = true;
        }
        #endregion

        public virtual Point TransformPoint(Point p)
        {
            return p;
        }

        public virtual bool Changed
        {
            set;
            get;
        }
    }
}
